<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<TITLE>新建联系人</TITLE>
<LINK href="<%=basePath%>/css/top.css" type=text/css rel=stylesheet>
<META content=C# name=CODE_LANGUAGE>
<META content=JavaScript name=vs_defaultClientScript>
<META content=http://schemas.microsoft.com/intellisense/ie5
	name=vs_targetSchema>
<LINK href="<%=basePath%>/css/popcalendar.css" type=text/css
	rel=stylesheet>
<LINK href="<%=basePath%>/css/main.css" type="text/css" rel="stylesheet">
<SCRIPT src="<%=basePath%>/js/popcalendar.js"></SCRIPT>

<SCRIPT src="<%=basePath%>/js/function.js"></SCRIPT>

<SCRIPT type="text/javascript">
function CheckForm()
{
   if(document.Form1.txtName.value=="")
   { 
	 alert("联系人姓名不能为空");
	 document.Form1.txtName.focus();
     return (false);
   }
   if(!checkIsDate(document.Form1.txtBirthday.value))
   {
	 alert("生日日期不正确，或非有效日期");
	 document.Form1.txtBirthday.focus();
	 return (false);
   }

   if (!isValidEmail(document.Form1.txtEmail.value)) {
       alert("请正确填写以下邮件地址：" + document.Form1.txtEmail.value);
       return false;
   }   
   return (true);
}

		</SCRIPT>

</HEAD>
<BODY topMargin=5>
<FORM id=Form1 name=Form1 action="ContactsServlet" method=post>
<DIV><INPUT id=__VIEWSTATE type=hidden value="add" name="contacts">
</DIV>
<DIV id=pnlMain>
<TABLE class=small cellSpacing=0 cellPadding=3 width="100%" border=0>
	<TBODY>
		<TR>
			<TD class=Big><IMG src="<%=basePath%>/img/office/address.gif"
				align=absMiddle> <SPAN class=big3> 联系人编辑</SPAN></TD>
		</TR>
	</TBODY>
</TABLE>
<TABLE class=small cellSpacing=1 cellPadding=2 width=450 align=center
	bgColor=#000000 border=0>

	<TBODY>




		<TR>
			<TD class=TableHeader noWrap colSpan=2><B>&nbsp;个人信息</B></TD>
		</TR>
		<TR>
			<TD class=TableData noWrap>姓名：</TD>
			<TD class=TableData><INPUT class=BigInput id=txtName
				maxLength=50 name=txtName value="${contactsDetail.personName}" /></TD>
		</TR>
		<TR>
			<TD class=TableData noWrap>性别：</TD>
			<TD class=TableData><SELECT class=BigSelect id=ddlSex
				name=txtSex>
				<OPTION value="${contactsDetail.personSex}">
				${contactsDetail.personSex}</OPTION>
			</SELECT></TD>
		</TR>
		<TR>
			<TD class=TableData noWrap>生日：</TD>
			<TD class=TableData><INPUT class=BigInput id=txtBirthday
				maxLength=20 size=10 name=txtBirthday
				value="${contactsDetail.personBir}" /> <IMG style="CURSOR: hand"
				onclick="popUpCalendar(this,txtBirthday,'yyyy-mm-dd','');"
				src="<%=basePath%>/img/office/calendar.gif" align=absMiddle border=0>
			</TD>
		</TR>

		<TR>
			<TD class=TableData noWrap>职务：</TD>
			<TD class=TableData><INPUT class=BigInput id=txtMinistration
				maxLength=50 size=25 name=txtDuty
				value="${contactsDetail.personDuty}" /></TD>
		</TR>
		<TR>
			<TD class=TableData noWrap>配偶：</TD>
			<TD class=TableData><INPUT class=BigInput id=txtMate
				maxLength=50 size=25 name=txtMate
				value="${contactsDetail.personMate}"></TD>
		</TR>

		<TR>
			<TD class=TableHeader noWrap colSpan=2>&nbsp;联系方式（单位）</TD>
		</TR>
		<TR>
			<TD class=TableData noWrap>单位名称：</TD>
			<TD class=TableData><INPUT class=BigInput id=txtDeptName
				maxLength=50 size=25 name=txtDeptName
				value="${contactsDetail.unitName}" /></TD>
		</TR>
		<TR>
			<TD class=TableData noWrap>单位地址：</TD>
			<TD class=TableData><INPUT class=BigInput id=txtDeptAddr
				maxLength=200 size=40 name=txtDeptAddr
				value="${contactsDetail.unitAddress}" /></TD>
		</TR>

		<TR>
			<TD class=TableData noWrap>单位电话：</TD>
			<TD class=TableData><INPUT class=BigInput id=txtDeptTel
				maxLength=50 size=25 name=txtDeptTel
				value="${contactsDetail.unitPhone}" /></TD>
		</TR>

		<TR>
			<TD class=TableHeader noWrap colSpan=2><B>&nbsp;联系方式（家庭）</B></TD>
		</TR>
		<TR>
			<TD class=TableData noWrap>家庭住址：</TD>
			<TD class=TableData><INPUT class=BigInput id=txtHomeAddr
				maxLength=200 size=40 name=txtHomeAddr
				value="${contactsDetail.familyAddress}" /></TD>
		</TR>
		<TR>
			<TD class=TableData noWrap>家庭邮编：</TD>
			<TD class=TableData><INPUT class=BigInput id=txtHomePost
				maxLength=50 size=25 name=txtHomePost
				value="${contactsDetail.familyPostcode}" /></TD>
		</TR>
		<TR>
			<TD class=TableData noWrap>家庭电话：</TD>
			<TD class=TableData><INPUT class=BigInput id=txtHomeTel
				maxLength=50 size=25 name=txtHomeTel
				value="${contactsDetail.familyPhone}" /></TD>
		</TR>
		<TR>
			<TD class=TableData noWrap>手机：</TD>
			<TD class=TableData><INPUT class=BigInput id=txtMobile
				maxLength=50 size=25 name=txtMobile
				value="${contactsDetail.personMobile}" /></TD>
		</TR>

		<TR>
			<TD class=TableData noWrap>电子邮件：</TD>
			<TD class=TableData><INPUT class=BigInput id=txtEmail
				maxLength=100 size=25 name=txtEmail
				value="${contactsDetail.personEmail}" /></TD>
		</TR>
		<TR>
			<TD class=TableData noWrap>QQ号码：</TD>
			<TD class=TableData><INPUT class=BigInput id=txtOicq
				maxLength=50 size=25 name=txtOicq value="${contactsDetail.personQQ}" />
			</TD>
		</TR>
		<TR>
			<TD class=TableData noWrap>MSN：</TD>
			<TD class=TableData><INPUT class=BigInput id=txtMsn maxLength=50
				size=25 name=txtMsn value="${contactsDetail.personMSN}" /></TD>
		</TR>
		<TR>
			<TD class=TableHeader noWrap colSpan=2><B>&nbsp;备 注</B></TD>
		</TR>
		<TR>
			<TD class=TableData colSpan=2><TEXTAREA class=BigInput
				id=txtNote name=txtNote rows=5 wrap=on cols=60
				value="${contactsDetail.personRemark}"></TEXTAREA></TD>
		</TR>
		<DIV id=pnlField></DIV>
		<TR class=TableControl align=middle>
			<TD noWrap colSpan=2><INPUT class=BigButton
				onClick="return CheckForm();" type=submit value=保存 /> &nbsp;&nbsp;
			<INPUT class=BigButton onClick="location='address.aspx?group_id=0'"
				type=button value=返回 /></TD>
		</TR>
	</TBODY>
</TABLE>
<BR>
</DIV>
<DIV></DIV>
</FORM>
</BODY>
</HTML>

